<html>
<head>
<script src="resources/webgl-test.js"></script>
<script src="../../resources/gc.js"></script>
</head>
<body>
<script>
if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.waitUntilDone();
}

window.onload = function()
{
    canvas = document.createElement("canvas");
    context = create3DContext(canvas);
    extension = context.getExtension("WEBGL_lose_context");
    
    canvas = null;
    context = null;
    gc();
    
    setTimeout(finishTest, 1);
}

function finishTest()
{
    extension.loseContext();
    
    document.body.innerHTML = "PASS";
    if (window.testRunner)
        testRunner.notifyDone();
}
</script>
</body>
</html>
